Optimal. Leaf size=156 \[ \frac {720 b \cos (c+d x)}{d^7}+\frac {6 a x \cos (c+d x)}{d^3}-\frac {360 b x^2 \cos (c+d x)}{d^5}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}+\frac {720 b x \sin (c+d x)}{d^6}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {6 b x^5 \sin (c+d x)}{d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3420, 3377,
2717, 2718} \begin {gather*} -\frac {6 a \sin (c+d x)}{d^4}+\frac {6 a x \cos (c+d x)}{d^3}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {a x^3 \cos (c+d x)}{d}+\frac {720 b \cos (c+d x)}{d^7}+\frac {720 b x \sin (c+d x)}{d^6}-\frac {360 b x^2 \cos (c+d x)}{d^5}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {30 b x^4 \cos (c+d x)}{d^3}+\frac {6 b x^5 \sin (c+d x)}{d^2}-\frac {b x^6 \cos (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 2718
Rule 3377
Rule 3420
Rubi steps
\begin {align*} \int x^3 \left (a+b x^3\right ) \sin (c+d x) \, dx &=\int \left (a x^3 \sin (c+d x)+b x^6 \sin (c+d x)\right ) \, dx\\ &=a \int x^3 \sin (c+d x) \, dx+b \int x^6 \sin (c+d x) \, dx\\ &=-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^6 \cos (c+d x)}{d}+\frac {(3 a) \int x^2 \cos (c+d x) \, dx}{d}+\frac {(6 b) \int x^5 \cos (c+d x) \, dx}{d}\\ &=-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^6 \cos (c+d x)}{d}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {6 b x^5 \sin (c+d x)}{d^2}-\frac {(6 a) \int x \sin (c+d x) \, dx}{d^2}-\frac {(30 b) \int x^4 \sin (c+d x) \, dx}{d^2}\\ &=\frac {6 a x \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {6 b x^5 \sin (c+d x)}{d^2}-\frac {(6 a) \int \cos (c+d x) \, dx}{d^3}-\frac {(120 b) \int x^3 \cos (c+d x) \, dx}{d^3}\\ &=\frac {6 a x \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {6 b x^5 \sin (c+d x)}{d^2}+\frac {(360 b) \int x^2 \sin (c+d x) \, dx}{d^4}\\ &=\frac {6 a x \cos (c+d x)}{d^3}-\frac {360 b x^2 \cos (c+d x)}{d^5}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {6 b x^5 \sin (c+d x)}{d^2}+\frac {(720 b) \int x \cos (c+d x) \, dx}{d^5}\\ &=\frac {6 a x \cos (c+d x)}{d^3}-\frac {360 b x^2 \cos (c+d x)}{d^5}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}+\frac {720 b x \sin (c+d x)}{d^6}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {6 b x^5 \sin (c+d x)}{d^2}-\frac {(720 b) \int \sin (c+d x) \, dx}{d^6}\\ &=\frac {720 b \cos (c+d x)}{d^7}+\frac {6 a x \cos (c+d x)}{d^3}-\frac {360 b x^2 \cos (c+d x)}{d^5}-\frac {a x^3 \cos (c+d x)}{d}+\frac {30 b x^4 \cos (c+d x)}{d^3}-\frac {b x^6 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}+\frac {720 b x \sin (c+d x)}{d^6}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {120 b x^3 \sin (c+d x)}{d^4}+\frac {6 b x^5 \sin (c+d x)}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 101, normalized size = 0.65 \begin {gather*} \frac {-\left (\left (a d^4 x \left (-6+d^2 x^2\right )+b \left (-720+360 d^2 x^2-30 d^4 x^4+d^6 x^6\right )\right ) \cos (c+d x)\right )+3 d \left (a d^2 \left (-2+d^2 x^2\right )+2 b x \left (120-20 d^2 x^2+d^4 x^4\right )\right ) \sin (c+d x)}{d^7} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(555\) vs.
\(2(156)=312\).
time = 0.06, size = 556, normalized size = 3.56 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 449 vs.
\(2 (156) = 312\).
time = 0.33, size = 449, normalized size = 2.88 \begin {gather*} \frac {a c^{3} \cos \left (d x + c\right ) - \frac {b c^{6} \cos \left (d x + c\right )}{d^{3}} - 3 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a c^{2} + \frac {6 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b c^{5}}{d^{3}} + 3 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} a c - \frac {15 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} b c^{4}}{d^{3}} - {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} a + \frac {20 \, {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} b c^{3}}{d^{3}} - \frac {15 \, {\left ({\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \cos \left (d x + c\right ) - 4 \, {\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \sin \left (d x + c\right )\right )} b c^{2}}{d^{3}} + \frac {6 \, {\left ({\left ({\left (d x + c\right )}^{5} - 20 \, {\left (d x + c\right )}^{3} + 120 \, d x + 120 \, c\right )} \cos \left (d x + c\right ) - 5 \, {\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \sin \left (d x + c\right )\right )} b c}{d^{3}} - \frac {{\left ({\left ({\left (d x + c\right )}^{6} - 30 \, {\left (d x + c\right )}^{4} + 360 \, {\left (d x + c\right )}^{2} - 720\right )} \cos \left (d x + c\right ) - 6 \, {\left ({\left (d x + c\right )}^{5} - 20 \, {\left (d x + c\right )}^{3} + 120 \, d x + 120 \, c\right )} \sin \left (d x + c\right )\right )} b}{d^{3}}}{d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 104, normalized size = 0.67 \begin {gather*} -\frac {{\left (b d^{6} x^{6} + a d^{6} x^{3} - 30 \, b d^{4} x^{4} - 6 \, a d^{4} x + 360 \, b d^{2} x^{2} - 720 \, b\right )} \cos \left (d x + c\right ) - 3 \, {\left (2 \, b d^{5} x^{5} + a d^{5} x^{2} - 40 \, b d^{3} x^{3} - 2 \, a d^{3} + 240 \, b d x\right )} \sin \left (d x + c\right )}{d^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.68, size = 185, normalized size = 1.19 \begin {gather*} \begin {cases} - \frac {a x^{3} \cos {\left (c + d x \right )}}{d} + \frac {3 a x^{2} \sin {\left (c + d x \right )}}{d^{2}} + \frac {6 a x \cos {\left (c + d x \right )}}{d^{3}} - \frac {6 a \sin {\left (c + d x \right )}}{d^{4}} - \frac {b x^{6} \cos {\left (c + d x \right )}}{d} + \frac {6 b x^{5} \sin {\left (c + d x \right )}}{d^{2}} + \frac {30 b x^{4} \cos {\left (c + d x \right )}}{d^{3}} - \frac {120 b x^{3} \sin {\left (c + d x \right )}}{d^{4}} - \frac {360 b x^{2} \cos {\left (c + d x \right )}}{d^{5}} + \frac {720 b x \sin {\left (c + d x \right )}}{d^{6}} + \frac {720 b \cos {\left (c + d x \right )}}{d^{7}} & \text {for}\: d \neq 0 \\\left (\frac {a x^{4}}{4} + \frac {b x^{7}}{7}\right ) \sin {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.04, size = 106, normalized size = 0.68 \begin {gather*} -\frac {{\left (b d^{6} x^{6} + a d^{6} x^{3} - 30 \, b d^{4} x^{4} - 6 \, a d^{4} x + 360 \, b d^{2} x^{2} - 720 \, b\right )} \cos \left (d x + c\right )}{d^{7}} + \frac {3 \, {\left (2 \, b d^{5} x^{5} + a d^{5} x^{2} - 40 \, b d^{3} x^{3} - 2 \, a d^{3} + 240 \, b d x\right )} \sin \left (d x + c\right )}{d^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.59, size = 151, normalized size = 0.97 \begin {gather*} \frac {d^4\,\left (6\,a\,x\,\cos \left (c+d\,x\right )+30\,b\,x^4\,\cos \left (c+d\,x\right )\right )+720\,b\,\cos \left (c+d\,x\right )-d^6\,\left (a\,x^3\,\cos \left (c+d\,x\right )+b\,x^6\,\cos \left (c+d\,x\right )\right )+d^5\,\left (3\,a\,x^2\,\sin \left (c+d\,x\right )+6\,b\,x^5\,\sin \left (c+d\,x\right )\right )-d^3\,\left (6\,a\,\sin \left (c+d\,x\right )+120\,b\,x^3\,\sin \left (c+d\,x\right )\right )+720\,b\,d\,x\,\sin \left (c+d\,x\right )-360\,b\,d^2\,x^2\,\cos \left (c+d\,x\right )}{d^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________